package org.flashamaphone.voices.waveformFactories.fm
{
	/** Generate a sine wave cycle with modulation */
	public class FMSineWaveFactory extends FMWaveFactory
	{
		/**
		 * FM wave factory
		 * 
		 * @param modulation
		 */
		public function FMSineWaveFactory(mod:int = 1) {
			super(mod);
		}
		
		/**
		 * sample a sin wave at a phase
		 */
		public override function sample(phase:Number):Number {
			return Math.sin( phase + Math.sin(phase * modulatorMultiplier));
		}
	}
}